import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import './assets/css/reset.css'
import { Tabbar, TabbarItem, Icon, Swipe, SwipeItem, Grid, GridItem, PullRefresh, List, NavBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Card, Popup, Button, Stepper, Form, Field, Toast, SwipeCell, Checkbox, CheckboxGroup, SubmitBar, Dialog, AddressList, AddressEdit, Area, ContactCard, Search, Lazyload } from 'vant'

import loading from 'plugins/loading'
import img from './assets/img/loading.gif'
// const loadingImg = require('./assets/img/loading.gif')
// require图片懒加载方法
Vue.use(loading)

Vue.use(Tabbar).use(TabbarItem).use(Icon).use(Swipe).use(SwipeItem).use(Grid).use(GridItem).use(PullRefresh).use(List).use(NavBar).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(Card).use(Popup).use(Button).use(Stepper).use(Form).use(Field).use(Toast).use(SwipeCell).use(Checkbox).use(CheckboxGroup).use(SubmitBar).use(Dialog).use(AddressList).use(AddressEdit).use(Area).use(ContactCard).use(Search).use(Lazyload, {
  loading: img,
  error: '',
  preload: '1'
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
